<?php

use Illuminate\Http\Request;

Route::post('/login', 'Api\CustomersController@login');
Route::post('/register', 'Api\CustomersController@register');

Route::group(['middleware' => 'passport-administrators'], function () {
    Route::get('/customer', 'Api\CustomersController@customer');
    Route::get('/logout', 'Api\CustomersController@logout');
});

Route::middleware('auth:api')->get('/user', function (Request $request) {
    return $request->user();
});
